﻿/*

  The contents of this file are subject to the Mozilla Public License Version
  1.1 (the "License"); you may not use this file except in compliance with
  the License. You may obtain a copy of the License at 
  
           http://www.mozilla.org/MPL/ 
  
  Software distributed under the License is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  for the specific language governing rights and limitations under the License. 
  
  The Original Code is AST'r Framework.
  
  The Initial Developer of the Original Code is
  ALCARAZ Marc (aka eKameleon) <vegas@ekameleon.net>.
  Portions created by the Initial Developer are Copyright (C) 2004-2007
  the Initial Developer. All Rights Reserved.
  
  Contributor(s) :
  
*/

import andromeda.model.map.MapModel;

import ewhiteboard.plugins.whiteboard.IWhiteBoardPlugin;

/**
 * This model is a MapModel collector who supports only IWhiteBoardPlugin value objects. 
 * @author eKameleon
 */
class ewhiteboard.model.WhiteBoardPluginCollector extends MapModel 
{
	
	/**
	 * Creates a new WhiteBoardPluginCollector instance.
	 * @param id the id of this model.
	 * @param bGlobal the flag to use a global event flow or a local event flow.
	 * @param sChannel (optional) the name of the global event flow if the {@code bGlobal} argument is {@code true}.
	 */
	function WhiteBoardPluginCollector(id, bGlobal : Boolean, sChannel : String) 
	{
		super(id, bGlobal, sChannel);
	}
	
	/**
	 * Returns {@code true} if the {@code IValidator} object validate the value.
	 * @param value the object to test.
	 * @return {@code true} is this specific value is valid.
	 */
	public function supports( value ):Boolean 
	{
		return value instanceof IWhiteBoardPlugin ;
	}

}